﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Silvermoon.Windows;
using Silvermoon.Controls;
using Silvermoon.Shapes;
using Passwords.Pages;
using Passwords.Images;
using System.Drawing;
using Silvermoon.UI;
using Silvermoon.OpenGL;
using Silvermoon.Windows.Styles;


namespace Passwords.Styles
{
    public class DefaultStyle : StyleDictionary
    {
        static VisualStateManager ItemManager = new VisualStateManager(
            new VisualStateGroup(
                new VisualState(VState.Normal,
                    new ColorTransition { Property = Control.ColorProperty, To = Color.White, Duration = 500, Tracking = TrackMode.Keep }
                 ),
                new VisualState(VState.Pressed,
            //new ColorTransition { Property = Control.TextColorProperty, To = Color.White, Duration = 5 },
                new ColorTransition { Property = Control.ColorProperty, To = PhoneColors.Accent, Duration = 5, Tracking = TrackMode.Keep }
                )
             ));


        public static readonly StyleDictionary Instance = new DefaultStyle();

        public DefaultStyle()
            : base()
        {
            SetClass(typeof(Button), MetroButtonStyle.Instance);
            SetClass(typeof(TextBox), new MetroTextBoxStyle());
            SetClass(typeof(Slider), new MetroSliderStyle());
            SetClass(typeof(Dialog), new MetroDialogStyle());

        }


        private static GradientStopShape CreateFadeingShape()
        {
            GradientStopShape shape = new GradientStopShape();
            const int end = 12;
            shape.End = end;
            shape.GradientStops = new GradientStop[]
            {
                new GradientStop(0,255,0,0,0),
                new GradientStop(1,0,0,0,0),
           //     new GradientStop(end/2,64,0,0,255),
                new GradientStop(end-1,0,0,0,0),
                new GradientStop(end,255,0,0,0)
            };
            return shape;
        }


    }
}
